#! -*- encoding: utf-8 -*-
print("""The sum of the primes below 10 is 2 + 3 + 5 + 7 = 17.

Find the sum of all the primes below two million.""")
print("")

import EulerHelper
n = 2000000
x = 2
bitmask = [True] * n

for i in range(3, n, 2):
    if bitmask[i] == True:
        if EulerHelper.isPrime(i):
            x += i
            y = i
            while y < n:
                bitmask[y] = False
                y += y

print x
